<?php

$cities = array(
  "United Kingdom" => "London",
  "United States" => "Washington",
  "France" => "Paris",
  "India" => "Delhi"
);

# 1st way
foreach ($cities as $key=>$value)
{
  echo "$value is in $key \n";
}
echo "\n------------------\n\n";
# 2nd way but don't use that...
foreach ($cities as $key=>$value):
  echo "$value is in $key";
  echo "\n";
endforeach;
echo "\n------------------\n\n";

# 3rd way
foreach ($cities as $value)
{
  echo "$value is capital of Country \n";
}
echo "\n------------------\n\n";
